
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Xml;
using System.Web;
using DotNetNuke;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Search;

namespace eMarketing
{
    /// -----------------------------------------------------------------------------
    ///<summary>
    /// The Controller class for the eMarketing
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    public class tm_user_groupsController : DotNetNuke.Entities.Modules.ISearchable, DotNetNuke.Entities.Modules.IPortable
    {
        #region "Public Methods"
        public tm_user_groupsInfo Get(int groupId)
        {
            return (tm_user_groupsInfo)DotNetNuke.Common.Utilities.CBO.FillObject(DataProvider.Instance().Gettm_user_groups(groupId), typeof(tm_user_groupsInfo));
        }

        public ArrayList List()
        {
            return DotNetNuke.Common.Utilities.CBO.FillCollection(eMarketing.DataProvider.Instance().Listtm_user_groups(), typeof(tm_user_groupsInfo));
        }


        public int Add(tm_user_groupsInfo objtm_user_groups)
        {
            return (int)DataProvider.Instance().Addtm_user_groups(objtm_user_groups.groupType, objtm_user_groups.groupCode, objtm_user_groups.description, objtm_user_groups.userId, objtm_user_groups.createOn, objtm_user_groups.status, objtm_user_groups.sendToBuyer, objtm_user_groups.sendToSeller, objtm_user_groups.sendToVendor);
        }

        public void Update(tm_user_groupsInfo objtm_user_groups)
        {
            DataProvider.Instance().Updatetm_user_groups(objtm_user_groups.groupId, objtm_user_groups.groupType, objtm_user_groups.groupCode, objtm_user_groups.description, objtm_user_groups.userId, objtm_user_groups.createOn, objtm_user_groups.status, objtm_user_groups.sendToBuyer, objtm_user_groups.sendToSeller, objtm_user_groups.sendToVendor);
        }

        public void Delete(int groupId)
        {
            DataProvider.Instance().Deletetm_user_groups(groupId);
        }
        #endregion

        #region "Optional Interfaces"
        public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
        {
            return null;
        }

        public string ExportModule(int ModuleID)
        {
            return "";
        }

        public void ImportModule(int ModuleID, string Content, string Version, int UserId)
        {
        }
        #endregion
    }

    public class tm_group_syscodesController : DotNetNuke.Entities.Modules.ISearchable, DotNetNuke.Entities.Modules.IPortable
    {
        #region "Public Methods"
        public tm_group_syscodesInfo Get(int id)
        {
            return (tm_group_syscodesInfo)DotNetNuke.Common.Utilities.CBO.FillObject(DataProvider.Instance().Gettm_group_syscodes(id), typeof(tm_group_syscodesInfo));
        }

        public ArrayList List()
        {
            return DotNetNuke.Common.Utilities.CBO.FillCollection(DataProvider.Instance().Listtm_group_syscodes(), typeof(tm_group_syscodesInfo));
        }


        public int Add(tm_group_syscodesInfo objtm_group_syscodes)
        {
            return (int)DataProvider.Instance().Addtm_group_syscodes(objtm_group_syscodes.groupId, objtm_group_syscodes.syscodeId);
        }

        public void Update(tm_group_syscodesInfo objtm_group_syscodes)
        {
            DataProvider.Instance().Updatetm_group_syscodes(objtm_group_syscodes.id, objtm_group_syscodes.groupId, objtm_group_syscodes.syscodeId);
        }

        public void Delete(int id)
        {
            DataProvider.Instance().Deletetm_group_syscodes(id);
        }
        #endregion

        #region "Optional Interfaces"
        public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
        {
            return null;
        }

        public string ExportModule(int ModuleID)
        {
            return "";
        }

        public void ImportModule(int ModuleID, string Content, string Version, int UserId)
        {
        }
        #endregion
    }
}

